package org.gd.hellojaxb.adapters;


import javax.xml.bind.annotation.adapters.XmlAdapter;

public class IntAdaptersFactory {

    public static final class Integer extends XmlAdapter<String, java.lang.Integer> {
        @Override
        public java.lang.Integer unmarshal(String v) throws Exception {
            if(v == null) {
                return null;
            }
            return java.lang.Integer.parseInt(v);
        }
        @Override
        public String marshal(java.lang.Integer v) throws Exception {
            if(v == null) {
                return null;
            }
            return java.lang.Integer.toString(v);
        }
    }

    public static final class Long extends XmlAdapter<String, java.lang.Long> {
        @Override
        public java.lang.Long unmarshal(String v) throws Exception {
            if(v == null) {
                return null;
            }
            return java.lang.Long.parseLong(v);
        }
        @Override
        public String marshal(java.lang.Long v) throws Exception {
            if(v == null) {
                return null;
            }
            return java.lang.Long.toString(v);
        }
    }
}
